#ifndef FORM_YB_QLSJSC_H
#define FORM_YB_QLSJSC_H

#include <QWidget>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkInterface>
#include <QNetworkRequest>
#include <QJsonObject>
#include <QJsonArray>
#include <QSqlQuery>
#include <QMap>
#include <QSqlQueryModel>
#include <QFile>

namespace Ui {
class Form_qlsjsc;
}

class Form_qlsjsc : public QWidget
{
    Q_OBJECT

public:
    explicit Form_qlsjsc(QWidget *parent = nullptr);
    ~Form_qlsjsc();

    void closeEvent(QCloseEvent *event);

signals:
    void destroyW( QString );

public slots:

    void upload0304(QString busi, QString intype, bool self_called = true);
    void upload0506(QString busi, QString outype, QString reci_no = "");
    void upload3501();
    void open_log_file();

private slots:

    void search0304(QString busi, QString intype);
    void search0506(QString busi, QString outype);
    void search3501();


    void on_pbUpload_clicked();

    void chk_result_diaplay( QString , QString);
    bool call_noRet(QString busi, QJsonObject &inpu, QString clinic_code = "");

    void on_pbExit_clicked();

    void on_pbSearch_clicked();

    void on_tvUploaded_clicked(const QModelIndex &index);

    void on_rb3501u_clicked();

    void on_rb3503u_clicked();

    void on_rb3504u_clicked();

    void on_rb3505u_clicked();

    void on_rb3506u_clicked();

    void on_pbUpload_2_clicked();

    void on_rb3502u_clicked();

    void on_pbAllSelect_clicked();

    void on_pb_fresh_local_clicked();

    void on_tv_store_clicked(const QModelIndex &index);

    void on_tv_store_doubleClicked(const QModelIndex &index);

    void on_pb_check_clicked();

    void on_pushButton_clicked();

private:
    Ui::Form_qlsjsc *ui;

    QSqlQuery *qrm, *qro, *qrot;
    QSqlQueryModel *mdList ;//
    QSqlQueryModel *md_store ;//

    QString sq;

    QNetworkRequest request;
    QNetworkAccessManager manager ;

    //QString currentMsgid;

    QMap<QString, QString> mpInfo;
    QFile *logFile;

    //bool been_called; //被付药调用，非独立运行
};

#endif // FORM_YB_QLSJSC_H
